<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>使用Gitee+Hexo搭建个人博客 | 星辰阁</title>
  <meta name="keywords" content=" 教程 , hexo ">
  <meta name="description" content="使用Gitee+Hexo搭建个人博客 | 星辰阁">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="个人简介李瑞桐 毕业于东北石油大学，目前从事殡葬相关应用开发工作。 喜欢研究新兴技术。 联系方式QQ :86415270邮箱 :86415270@qq.com">
<meta property="og:type" content="website">
<meta property="og:title" content="about">
<meta property="og:url" content="https://loveyangxiaoyu.gitee.io/lrt_blog/about/index.html">
<meta property="og:site_name" content="星辰阁">
<meta property="og:description" content="个人简介李瑞桐 毕业于东北石油大学，目前从事殡葬相关应用开发工作。 喜欢研究新兴技术。 联系方式QQ :86415270邮箱 :86415270@qq.com">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2019-11-11T07:11:13.000Z">
<meta property="article:modified_time" content="2022-11-20T05:27:08.036Z">
<meta property="article:author" content="李瑞桐">
<meta name="twitter:card" content="summary">


<link rel="icon" href="/lrt_blog/img/favicon.png" type="images/x-icon">

<link href="/lrt_blog/css/style.css?v=1.0.0" rel="stylesheet">

<link href="/lrt_blog/css/hl_theme/atom-light.css?v=1.0.0" rel="stylesheet">

<link href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/lrt_blog/js/jquery.autocomplete.min.js?v=1.0.0" ></script>

<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>



<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js" ></script>

<script src="/lrt_blog/js/iconfont.js?v=1.0.0" ></script>

<meta name="generator" content="Hexo 4.2.1"><link rel="alternate" href="/lrt_blog/atom.xml" title="星辰阁" type="application/atom+xml">
</head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="false">
  <input class="theme_blog_path" value="/lrt_blog">
</div>

<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/lrt_blog/" class="avatar_target">
    <img class="avatar" src="/lrt_blog/img/avatar.jpg" />
</a>
<div class="author">
    <span>李瑞桐</span>
</div>

<div class="icon">
    
        
        <a title="rss" href="/lrt_blog/atom.xml" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-rss"></use>
                </svg>
            
        </a>
        
    
        
        <a title="github" href="https://github.com/lrt890424" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-github"></use>
                </svg>
            
        </a>
        
    
        
        <a title="gitee" href="https://gitee.com/loveyangxiaoyu" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-gitee"></use>
                </svg>
            
        </a>
        
    
        
    
        
    
        
        <a title="csdn" href="https://blog.csdn.net/lrt890424" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-csdn"></use>
                </svg>
            
        </a>
        
    
        
        <a title="oschina" href="https://my.oschina.net/loveyangxiaoyu" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-oschina"></use>
                </svg>
            
        </a>
        
    
        
    
</div>




<ul>
    <li><div class="all active">全部文章<small>(33)</small></div></li>
    
        
            
            <li><div data-rel="Linux"><i class="fold iconfont icon-right"></i>Linux<small>(9)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="CentOS">CentOS<small>(3)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Ubuntu">Ubuntu<small>(2)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
        
            
        
    
        
            
            <li><div data-rel="开发工具"><i class="fold iconfont icon-right"></i>开发工具<small>(6)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="SVN">SVN<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Git">Git<small>(2)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="jd-gui">jd-gui<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Markdown">Markdown<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Maven">Maven<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="存储"><i class="fold iconfont icon-right"></i>存储<small>(7)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="MongoDB">MongoDB<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="MySQL">MySQL<small>(3)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Redis">Redis<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Navicat">Navicat<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="DM">DM<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="Windows">Windows<small>(3)</small></div>
                
            </li>
            
        
    
        
            
        
    
        
            
            <li><div data-rel="笔记">笔记<small>(1)</small></div>
                
            </li>
            
        
    
        
            
        
    
        
            
            <li><div data-rel="Web服务器"><i class="fold iconfont icon-right"></i>Web服务器<small>(1)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="Nginx">Nginx<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="容器"><i class="fold iconfont icon-right"></i>容器<small>(1)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="Docker">Docker<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="前端开发"><i class="fold iconfont icon-right"></i>前端开发<small>(3)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="Vue CLI">Vue CLI<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Yarn">Yarn<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="Eslint">Eslint<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
            <li><div data-rel="工具"><i class="fold iconfont icon-right"></i>工具<small>(1)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="hexo">hexo<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
            <li><div data-rel="开源">开源<small>(1)</small></div>
                
            </li>
            
        
    
        
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    
    
    </div>
    <div><a class="about  site_url"  href="/lrt_blog/about">关于</a></div>
</div>
<input type="hidden" id="yelog_site_posts_number" value="33">
<input type="hidden" id="yelog_site_word_count" value="52k">
<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
            <li><a target="_blank" href="http://yelog.org/">叶落阁</a></li>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode==13){return false;}">
        <input class="search" type="text" placeholder="以 in: 开头进行全文搜索" autocomplete="off"id="local-search-input" >
        <i class="cross"></i>
        <span>
            <label for="tagswitch">Tags:</label>
            <input id="tagswitch" type="checkbox" style="display: none" />
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a class="color3">教程</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">centos</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">linux</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">问题集锦</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">防火墙</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">软件安装</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">ubuntu</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">svn</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">git</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">MongoDB</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">jd-gui</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">java</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">反编译</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">MySQL</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">Redis</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">学习笔记</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">navicat</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">DM</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">windows</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">系统优化</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">书签</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">Nginx</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">docker</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">vue</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">Yarn</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">前端开发</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">vscode</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">eslint</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">prettier</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">Markdown</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">hexo</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">开源</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">Maven</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <div id="local-search-result">

    </div>
    
    <nav id="title-list-nav">
        
        <a  class="Windows "
           href="/lrt_blog/2022/11/20/01Windows/Windows11%E4%BC%98%E5%8C%96%E9%85%8D%E7%BD%AE/"
           data-tag="windows,系统优化"
           data-author="" >
            <span class="post-title" title="Windows11优化配置">Windows11优化配置</span>
            <span class="post-date" title="2022-11-20 00:00:00">2022/11/20</span>
        </a>
        
        <a  class="存储 DM "
           href="/lrt_blog/2021/11/16/04%E5%AD%98%E5%82%A8/%E9%93%B6%E6%B2%B3%E9%BA%92%E9%BA%9F%E5%AE%89%E8%A3%85%E8%BE%BE%E6%A2%A6%E6%95%B0%E6%8D%AE%E5%BA%93/"
           data-tag="软件安装,DM"
           data-author="" >
            <span class="post-title" title="银河麒麟安装达梦数据库">银河麒麟安装达梦数据库</span>
            <span class="post-date" title="2021-11-16 00:00:00">2021/11/16</span>
        </a>
        
        <a  class="前端开发 Vue CLI "
           href="/lrt_blog/2021/02/02/66%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/vue-cli%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE/"
           data-tag="教程,vue"
           data-author="" >
            <span class="post-title" title="Vue CLI创建项目">Vue CLI创建项目</span>
            <span class="post-date" title="2021-02-02 21:08:20">2021/02/02</span>
        </a>
        
        <a  class="前端开发 Eslint "
           href="/lrt_blog/2021/02/01/66%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/vscode%E4%B8%8A%E9%85%8D%E7%BD%AEEslint-Prettier/"
           data-tag="前端开发,vscode,eslint,prettier"
           data-author="" >
            <span class="post-title" title="vscode上配置Eslint+Prettier">vscode上配置Eslint+Prettier</span>
            <span class="post-date" title="2021-02-01 00:00:00">2021/02/01</span>
        </a>
        
        <a  class="前端开发 Yarn "
           href="/lrt_blog/2021/01/31/66%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/%E5%8C%85%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7yarn%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE/"
           data-tag="教程,Yarn"
           data-author="" >
            <span class="post-title" title="包管理工具yarn安装和配置">包管理工具yarn安装和配置</span>
            <span class="post-date" title="2021-01-31 17:37:05">2021/01/31</span>
        </a>
        
        <a  class="Web服务器 Nginx "
           href="/lrt_blog/2020/04/30/05web%E6%9C%8D%E5%8A%A1%E5%99%A8/Linux%E4%B8%8B%E5%AE%89%E8%A3%85Nginx%E6%9C%8D%E5%8A%A1/"
           data-tag="软件安装,Nginx"
           data-author="" >
            <span class="post-title" title="Linux下安装Nginx服务">Linux下安装Nginx服务</span>
            <span class="post-date" title="2020-04-30 10:10:58">2020/04/30</span>
        </a>
        
        <a  class="存储 MongoDB "
           href="/lrt_blog/2020/04/30/04%E5%AD%98%E5%82%A8/Linux%E4%B8%8B%E5%AE%89%E8%A3%85MongoDB%E6%9C%8D%E5%8A%A1/"
           data-tag="软件安装,MongoDB"
           data-author="" >
            <span class="post-title" title="Linux下安装MongoDB服务">Linux下安装MongoDB服务</span>
            <span class="post-date" title="2020-04-30 00:00:00">2020/04/30</span>
        </a>
        
        <a  class="存储 Redis "
           href="/lrt_blog/2020/04/30/04%E5%AD%98%E5%82%A8/Linux%E4%B8%8B%E5%AE%89%E8%A3%85Redis%E6%9C%8D%E5%8A%A1/"
           data-tag="软件安装,Redis"
           data-author="" >
            <span class="post-title" title="Linux下安装Redis服务">Linux下安装Redis服务</span>
            <span class="post-date" title="2020-04-30 00:00:00">2020/04/30</span>
        </a>
        
        <a  class="容器 Docker "
           href="/lrt_blog/2020/01/04/03%E5%AE%B9%E5%99%A8/docker%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85/"
           data-tag="软件安装,docker"
           data-author="" >
            <span class="post-title" title="docker离线安装">docker离线安装</span>
            <span class="post-date" title="2020-01-04 00:00:00">2020/01/04</span>
        </a>
        
        <a  class="笔记 "
           href="/lrt_blog/2019/12/26/07Java/%E5%AD%A6%E4%B9%A0-%E4%B9%A6%E7%AD%BE/"
           data-tag="书签"
           data-author="" >
            <span class="post-title" title="学习-书签">学习-书签</span>
            <span class="post-date" title="2019-12-26 00:00:00">2019/12/26</span>
        </a>
        
        <a  class="开源 "
           href="/lrt_blog/2019/12/19/77%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/%E5%9B%BD%E5%86%85%E5%BC%80%E6%BA%90%E9%95%9C%E5%83%8F%E7%AB%99%E7%82%B9/"
           data-tag="开源"
           data-author="" >
            <span class="post-title" title="国内开源镜像站点">国内开源镜像站点</span>
            <span class="post-date" title="2019-12-19 00:00:00">2019/12/19</span>
        </a>
        
        <a  class="存储 MySQL "
           href="/lrt_blog/2019/12/16/04%E5%AD%98%E5%82%A8/MySQL%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"
           data-tag="MySQL,学习笔记"
           data-author="" >
            <span class="post-title" title="MySQL 学习笔记">MySQL 学习笔记</span>
            <span class="post-date" title="2019-12-16 00:00:00">2019/12/16</span>
        </a>
        
        <a  class="存储 MySQL "
           href="/lrt_blog/2019/12/15/04%E5%AD%98%E5%82%A8/Linux%E7%8E%AF%E5%A2%83%E4%B8%8B%E5%AE%89%E8%A3%85MySQL%E6%9C%8D%E5%8A%A1/"
           data-tag="软件安装,MySQL"
           data-author="" >
            <span class="post-title" title="Linux环境下安装MySQL服务">Linux环境下安装MySQL服务</span>
            <span class="post-date" title="2019-12-15 00:00:00">2019/12/15</span>
        </a>
        
        <a  class="存储 Navicat "
           href="/lrt_blog/2019/12/15/04%E5%AD%98%E5%82%A8/Navicat%20Premium%2012%20%E7%A0%B4%E8%A7%A3/"
           data-tag="软件安装,navicat"
           data-author="" >
            <span class="post-title" title="Navicat Premium 12 破解">Navicat Premium 12 破解</span>
            <span class="post-date" title="2019-12-15 00:00:00">2019/12/15</span>
        </a>
        
        <a  class="存储 MySQL "
           href="/lrt_blog/2019/12/15/04%E5%AD%98%E5%82%A8/Windows%E7%8E%AF%E5%A2%83%E4%B8%8B%E5%AE%89%E8%A3%85MySQL%E6%9C%8D%E5%8A%A1/"
           data-tag="软件安装,MySQL"
           data-author="" >
            <span class="post-title" title="Windows环境下安装MySQL服务">Windows环境下安装MySQL服务</span>
            <span class="post-date" title="2019-12-15 00:00:00">2019/12/15</span>
        </a>
        
        <a  class="开发工具 SVN "
           href="/lrt_blog/2019/12/01/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/Windows%E7%8E%AF%E5%A2%83%E4%B8%8B%E6%90%AD%E5%BB%BASVN%E6%9C%8D%E5%8A%A1%E5%99%A8/"
           data-tag="软件安装,svn"
           data-author="" >
            <span class="post-title" title="Windows环境下搭建SVN服务器">Windows环境下搭建SVN服务器</span>
            <span class="post-date" title="2019-12-01 00:00:00">2019/12/01</span>
        </a>
        
        <a  class="开发工具 Git "
           href="/lrt_blog/2019/11/30/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/git%E9%97%AE%E9%A2%98%E9%9B%86%E9%94%A6/"
           data-tag="问题集锦,git"
           data-author="" >
            <span class="post-title" title="git问题集锦">git问题集锦</span>
            <span class="post-date" title="2019-11-30 00:00:00">2019/11/30</span>
        </a>
        
        <a  class="开发工具 Git "
           href="/lrt_blog/2019/11/30/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/Git%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"
           data-tag="git"
           data-author="" >
            <span class="post-title" title="Git 学习笔记">Git 学习笔记</span>
            <span class="post-date" title="2019-11-30 00:00:00">2019/11/30</span>
        </a>
        
        <a  class="开发工具 jd-gui "
           href="/lrt_blog/2019/11/30/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/jd-gui%E5%8F%8D%E7%BC%96%E8%AF%91jar%E5%90%8E%E6%B8%85%E9%99%A4%E5%90%8E%E9%9D%A2%E7%9A%84%E6%B3%A8%E9%87%8A%E4%BF%A1%E6%81%AF%E5%8F%8A%E8%A1%8C%E5%8F%B7/"
           data-tag="jd-gui,java,反编译"
           data-author="" >
            <span class="post-title" title="jd-gui反编译jar后清除后面的注释信息及行号">jd-gui反编译jar后清除后面的注释信息及行号</span>
            <span class="post-date" title="2019-11-30 00:00:00">2019/11/30</span>
        </a>
        
        <a  class="开发工具 Maven "
           href="/lrt_blog/2019/11/30/02%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/Maven%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"
           data-tag="教程,Maven"
           data-author="" >
            <span class="post-title" title="Maven 学习笔记">Maven 学习笔记</span>
            <span class="post-date" title="2019-11-30 00:00:00">2019/11/30</span>
        </a>
        
        <a  class="Windows "
           href="/lrt_blog/2019/11/24/01Windows/Windows10%E4%BC%98%E5%8C%96%E9%85%8D%E7%BD%AE/"
           data-tag="windows,系统优化"
           data-author="" >
            <span class="post-title" title="Windows10优化配置">Windows10优化配置</span>
            <span class="post-date" title="2019-11-24 00:00:00">2019/11/24</span>
        </a>
        
        <a  class="Windows "
           href="/lrt_blog/2019/11/24/01Windows/Windows10%E5%8F%96%E6%B6%88%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0/"
           data-tag="windows,系统优化"
           data-author="" >
            <span class="post-title" title="Windows10取消自动更新">Windows10取消自动更新</span>
            <span class="post-date" title="2019-11-24 00:00:00">2019/11/24</span>
        </a>
        
        <a  class="Linux CentOS "
           href="/lrt_blog/2019/11/23/01Linux/CentOS%20yum%E5%91%BD%E4%BB%A4/"
           data-tag="教程,centos"
           data-author="" >
            <span class="post-title" title="yum命令">yum命令</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux Ubuntu "
           href="/lrt_blog/2019/11/23/01Linux/sudo%E7%9B%B8%E5%85%B3%E6%93%8D%E4%BD%9C/"
           data-tag="教程,linux"
           data-author="" >
            <span class="post-title" title="sudo相关操作">sudo相关操作</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux CentOS "
           href="/lrt_blog/2019/11/23/01Linux/CentOS%20%E6%97%B6%E5%8C%BA%E9%97%AE%E9%A2%98/"
           data-tag="centos,问题集锦"
           data-author="" >
            <span class="post-title" title="CentOS时区问题">CentOS时区问题</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux "
           href="/lrt_blog/2019/11/23/01Linux/Linux%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/"
           data-tag="教程,linux"
           data-author="" >
            <span class="post-title" title="Linux常用命令">Linux常用命令</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux CentOS "
           href="/lrt_blog/2019/11/23/01Linux/CentOS%20%E8%AE%BE%E7%BD%AE%E9%98%B2%E7%81%AB%E5%A2%99%E6%93%8D%E4%BD%9C%E3%80%81%E5%BC%80%E6%94%BE%E6%8C%87%E5%AE%9A%E7%AB%AF%E5%8F%A3%E6%93%8D%E4%BD%9C/"
           data-tag="centos,防火墙"
           data-author="" >
            <span class="post-title" title="CentOS设置防火墙操作、开放指定端口操作">CentOS设置防火墙操作、开放指定端口操作</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux Ubuntu "
           href="/lrt_blog/2019/11/23/01Linux/ubuntu%20root%E7%94%A8%E6%88%B7%E5%91%BD%E4%BB%A4%E8%A1%A5%E5%85%A8/"
           data-tag="ubuntu"
           data-author="" >
            <span class="post-title" title="ubuntu root用户命令补全">ubuntu root用户命令补全</span>
            <span class="post-date" title="2019-11-23 00:00:00">2019/11/23</span>
        </a>
        
        <a  class="Linux "
           href="/lrt_blog/2019/11/17/01Linux/%E9%85%8D%E7%BD%AEip+yum%E6%88%96apt%E6%BA%90/"
           data-tag="教程,linux"
           data-author="" >
            <span class="post-title" title="配置ip+yum或apt源">配置ip+yum或apt源</span>
            <span class="post-date" title="2019-11-17 00:00:00">2019/11/17</span>
        </a>
        
        <a  class="Linux "
           href="/lrt_blog/2019/11/16/01Linux/%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%AD%E5%AE%89%E8%A3%85centos7.6%E6%95%99%E7%A8%8B/"
           data-tag="centos,软件安装"
           data-author="" >
            <span class="post-title" title="虚拟机中安装centos7.6教程">虚拟机中安装centos7.6教程</span>
            <span class="post-date" title="2019-11-16 00:00:00">2019/11/16</span>
        </a>
        
        <a  class="Linux "
           href="/lrt_blog/2019/11/16/01Linux/%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%AD%E5%AE%89%E8%A3%85ubuntu16.04.06%E6%95%99%E7%A8%8B/"
           data-tag="软件安装,ubuntu"
           data-author="" >
            <span class="post-title" title="虚拟机中安装ubuntu16.04.06教程">虚拟机中安装ubuntu16.04.06教程</span>
            <span class="post-date" title="2019-11-16 00:00:00">2019/11/16</span>
        </a>
        
        <a  class="工具 hexo "
           href="/lrt_blog/2019/11/14/77%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/%E4%BD%BF%E7%94%A8Gitee+Hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/"
           data-tag="教程,hexo"
           data-author="" >
            <span class="post-title" title="使用Gitee+Hexo搭建个人博客">使用Gitee+Hexo搭建个人博客</span>
            <span class="post-date" title="2019-11-14 00:00:00">2019/11/14</span>
        </a>
        
        <a  class="开发工具 Markdown "
           href="/lrt_blog/2019/11/11/77%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/Markdown%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"
           data-tag="教程,Markdown"
           data-author="" >
            <span class="post-title" title="Markdown 学习笔记">Markdown 学习笔记</span>
            <span class="post-date" title="2019-11-11 00:00:00">2019/11/11</span>
        </a>
        
    </nav>
</div>
    </div>
    <div class="hide-list">
        <div class="semicircle">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-77其他工具/使用Gitee+Hexo搭建个人博客" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">使用Gitee+Hexo搭建个人博客</h1>
    
    <div class="article-meta">
        
        
        
        <span class="book">
            
                <a data-rel="工具">工具</a>/
            
                <a data-rel="hexo">hexo</a>
            
        </span>
        
        
        <span class="tag">
            
            <a class="color3">教程</a>
            
            <a class="color5">hexo</a>
            
        </span>
        
    </div>
    <div class="article-meta">
        
        创建时间:<time class="date" title='更新时间: 2021-02-19 14:17:21'>2019-11-14 00:00</time>
        
    </div>
    <div class="article-meta">
        
        <span>字数:4.1k</span>
        
        
        <span id="busuanzi_container_page_pv">
            阅读:<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
        <span class="top-comment" title="跳转至评论区">
            <a href="#comments">
                评论:<span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </a>
        </span>
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#使用Gitee-Hexo搭建个人博客"><span class="toc-text">使用Gitee+Hexo搭建个人博客</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#为何使用Gitee而不是GitHub"><span class="toc-text">为何使用Gitee而不是GitHub</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#环境要求"><span class="toc-text">环境要求</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#搭建Hexo"><span class="toc-text">搭建Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-安装Hexo"><span class="toc-text">1.安装Hexo</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-初始化Hexo"><span class="toc-text">2.初始化Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#config-yml"><span class="toc-text">_config.yml</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#package-json"><span class="toc-text">package.json</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#scaffolds"><span class="toc-text">scaffolds</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#source"><span class="toc-text">source</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#themes"><span class="toc-text">themes</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-获取博客主题"><span class="toc-text">3. 获取博客主题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-config-yml对博客进行基础配置"><span class="toc-text">4._config.yml对博客进行基础配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-本地预览博客"><span class="toc-text">5.本地预览博客</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6、-config-yml配置详解"><span class="toc-text">6、_config.yml配置详解</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#网站"><span class="toc-text">网站</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#网址"><span class="toc-text">网址</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#目录"><span class="toc-text">目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#文章"><span class="toc-text">文章</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#分类-amp-标签"><span class="toc-text">分类 &amp; 标签</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#日期-时间格式"><span class="toc-text">日期 &#x2F; 时间格式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#分页"><span class="toc-text">分页</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#扩展"><span class="toc-text">扩展</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#包括或不包括目录和文件"><span class="toc-text">包括或不包括目录和文件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#使用代替配置文件"><span class="toc-text">使用代替配置文件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#使用代替主题配置文件"><span class="toc-text">使用代替主题配置文件</span></a></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#部署博客到Gitee上"><span class="toc-text">部署博客到Gitee上</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-创建Gitee账号"><span class="toc-text">1. 创建Gitee账号</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-创建项目"><span class="toc-text">2. 创建项目</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-在-config-yml中配置Git"><span class="toc-text">3. 在_config.yml中配置Git</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-发布到Gitee"><span class="toc-text">4. 发布到Gitee</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-Gitee-Pages设置"><span class="toc-text">5. Gitee Pages设置</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置alias命令"><span class="toc-text">配置alias命令</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置二级目录categories、tags"><span class="toc-text">配置二级目录categories、tags</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置模板"><span class="toc-text">配置模板</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置编辑器"><span class="toc-text">配置编辑器</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1、新建scripts文件夹"><span class="toc-text">1、新建scripts文件夹</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-hexo配置帮助"><span class="toc-text">3-hexo配置帮助</span></a></li></ol></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-3 i,
    .toc-level-3 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p><div class='inner-toc'><h2>目录</h2><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#使用Gitee-Hexo搭建个人博客"><span class="toc-text">使用Gitee+Hexo搭建个人博客</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#为何使用Gitee而不是GitHub"><span class="toc-text">为何使用Gitee而不是GitHub</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#环境要求"><span class="toc-text">环境要求</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#搭建Hexo"><span class="toc-text">搭建Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-安装Hexo"><span class="toc-text">1.安装Hexo</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-初始化Hexo"><span class="toc-text">2.初始化Hexo</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#config-yml"><span class="toc-text">_config.yml</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#package-json"><span class="toc-text">package.json</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#scaffolds"><span class="toc-text">scaffolds</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#source"><span class="toc-text">source</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#themes"><span class="toc-text">themes</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-获取博客主题"><span class="toc-text">3. 获取博客主题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-config-yml对博客进行基础配置"><span class="toc-text">4._config.yml对博客进行基础配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-本地预览博客"><span class="toc-text">5.本地预览博客</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6、-config-yml配置详解"><span class="toc-text">6、_config.yml配置详解</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#网站"><span class="toc-text">网站</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#网址"><span class="toc-text">网址</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#目录"><span class="toc-text">目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#文章"><span class="toc-text">文章</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#分类-amp-标签"><span class="toc-text">分类 &amp; 标签</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#日期-时间格式"><span class="toc-text">日期 &#x2F; 时间格式</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#分页"><span class="toc-text">分页</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#扩展"><span class="toc-text">扩展</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#包括或不包括目录和文件"><span class="toc-text">包括或不包括目录和文件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#使用代替配置文件"><span class="toc-text">使用代替配置文件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#使用代替主题配置文件"><span class="toc-text">使用代替主题配置文件</span></a></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#部署博客到Gitee上"><span class="toc-text">部署博客到Gitee上</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-创建Gitee账号"><span class="toc-text">1. 创建Gitee账号</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-创建项目"><span class="toc-text">2. 创建项目</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-在-config-yml中配置Git"><span class="toc-text">3. 在_config.yml中配置Git</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-发布到Gitee"><span class="toc-text">4. 发布到Gitee</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-Gitee-Pages设置"><span class="toc-text">5. Gitee Pages设置</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置alias命令"><span class="toc-text">配置alias命令</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置二级目录categories、tags"><span class="toc-text">配置二级目录categories、tags</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置模板"><span class="toc-text">配置模板</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置编辑器"><span class="toc-text">配置编辑器</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1、新建scripts文件夹"><span class="toc-text">1、新建scripts文件夹</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-hexo配置帮助"><span class="toc-text">3-hexo配置帮助</span></a></li></ol></li></ol></div></p>
<h1 id="使用Gitee-Hexo搭建个人博客"><a href="#使用Gitee-Hexo搭建个人博客" class="headerlink" title="使用Gitee+Hexo搭建个人博客"></a>使用Gitee+Hexo搭建个人博客</h1><h2 id="为何使用Gitee而不是GitHub"><a href="#为何使用Gitee而不是GitHub" class="headerlink" title="为何使用Gitee而不是GitHub"></a>为何使用Gitee而不是GitHub</h2><p>目前国内访问GitHub速度慢，还可能被墙，所以Gitee来构建个人博客。Gitee类似国内版的GitHub，访问速度有保证。</p>
<h2 id="环境要求"><a href="#环境要求" class="headerlink" title="环境要求"></a>环境要求</h2><ol>
<li>git</li>
<li>node</li>
<li>yarn</li>
</ol>
<h2 id="搭建Hexo"><a href="#搭建Hexo" class="headerlink" title="搭建Hexo"></a>搭建Hexo</h2><p><a href="https://hexo.io/zh-cn/docs/" target="_blank" rel="noopener">hexo官方文档</a></p>
<h3 id="1-安装Hexo"><a href="#1-安装Hexo" class="headerlink" title="1.安装Hexo"></a>1.安装Hexo</h3><pre><code class="bash">$ yarn global add hexo</code></pre>
<h3 id="2-初始化Hexo"><a href="#2-初始化Hexo" class="headerlink" title="2.初始化Hexo"></a>2.初始化Hexo</h3><p>在你的电脑上创建blog文件夹，在shell终端中切换到blog目录，输入命令 <code>hexo init</code></p>
<pre><code class="shell">$ hexo init &lt;folder&gt;
$ cd &lt;folder&gt;
$ yarn</code></pre>
<p>新建完成后，指定文件夹的目录如下：</p>
<pre><code>.
├── _config.yml
├── package.json
├── scaffolds
├── source
|   ├── _drafts
|   └── _posts
└── themes</code></pre><h4 id="config-yml"><a href="#config-yml" class="headerlink" title="_config.yml"></a>_config.yml</h4><p>网站的 <a href="https://hexo.io/zh-cn/docs/configuration" target="_blank" rel="noopener">配置</a> 信息，您可以在此配置大部分的参数。</p>
<h4 id="package-json"><a href="#package-json" class="headerlink" title="package.json"></a>package.json</h4><p>应用程序的信息。<a href="https://ejs.co/" target="_blank" rel="noopener">EJS</a>, <a href="http://learnboost.github.io/stylus/" target="_blank" rel="noopener">Stylus</a> 和 <a href="http://daringfireball.net/projects/markdown/" target="_blank" rel="noopener">Markdown</a> renderer 已默认安装，您可以自由移除。</p>
<pre><code>package.json{
  &quot;name&quot;: &quot;hexo-site&quot;,
  &quot;version&quot;: &quot;0.0.0&quot;,
  &quot;private&quot;: true,
  &quot;hexo&quot;: {
    &quot;version&quot;: &quot;&quot;
  },
  &quot;dependencies&quot;: {
    &quot;hexo&quot;: &quot;^3.8.0&quot;,
    &quot;hexo-generator-archive&quot;: &quot;^0.1.5&quot;,
    &quot;hexo-generator-category&quot;: &quot;^0.1.3&quot;,
    &quot;hexo-generator-index&quot;: &quot;^0.2.1&quot;,
    &quot;hexo-generator-tag&quot;: &quot;^0.2.0&quot;,
    &quot;hexo-renderer-ejs&quot;: &quot;^0.3.1&quot;,
    &quot;hexo-renderer-stylus&quot;: &quot;^0.3.3&quot;,
    &quot;hexo-renderer-marked&quot;: &quot;^0.3.2&quot;,
    &quot;hexo-server&quot;: &quot;^0.3.3&quot;
  }
}</code></pre><h4 id="scaffolds"><a href="#scaffolds" class="headerlink" title="scaffolds"></a>scaffolds</h4><p><a href="https://hexo.io/zh-cn/docs/writing" target="_blank" rel="noopener">模版</a> 文件夹。当您新建文章时，Hexo 会根据 scaffold 来建立文件。</p>
<p>Hexo的模板是指在新建的文章文件中默认填充的内容。例如，如果您修改scaffold/post.md中的Front-matter内容，那么每次新建一篇文章时都会包含这个修改。</p>
<h4 id="source"><a href="#source" class="headerlink" title="source"></a>source</h4><p>资源文件夹是存放用户资源的地方。除 <code>_posts</code> 文件夹之外，开头命名为 <code>_</code> (下划线)的文件 / 文件夹和隐藏的文件将会被忽略。Markdown 和 HTML 文件会被解析并放到 <code>public</code> 文件夹，而其他文件会被拷贝过去。</p>
<h4 id="themes"><a href="#themes" class="headerlink" title="themes"></a>themes</h4><p><a href="https://hexo.io/zh-cn/docs/themes" target="_blank" rel="noopener">主题</a> 文件夹。Hexo 会根据主题来生成静态页面。</p>
<h3 id="3-获取博客主题"><a href="#3-获取博客主题" class="headerlink" title="3. 获取博客主题"></a>3. 获取博客主题</h3><p>在shell中输入命令：<code>git clone https://github.com/yelog/hexo-theme-3-hexo.git themes/3-hexo</code></p>
<p>修改hexo根目录的<code>_config.yml</code>，如下</p>
<pre><code class="bash">theme: 3-hexo</code></pre>
<p>想获取更多主题，可在网站：<a href="https://links.jianshu.com/go?to=https%3A%2F%2Fhexo.io%2Fthemes%2F" target="_blank" rel="noopener">https://hexo.io/themes/</a> 选择自己喜欢的主题，按照此步的步骤clone下来。</p>
<h3 id="4-config-yml对博客进行基础配置"><a href="#4-config-yml对博客进行基础配置" class="headerlink" title="4._config.yml对博客进行基础配置"></a>4._config.yml对博客进行基础配置</h3><p>_config.yml文件修改，保存</p>
<pre><code class="yml"># Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
# 博客名
title: 星辰阁
subtitle: &#39;&#39;
description: &#39;&#39;
keywords:
#作者
author: 李瑞桐
language: zh-CN
timezone: &#39;&#39;

theme: 3-hexo</code></pre>
<h3 id="5-本地预览博客"><a href="#5-本地预览博客" class="headerlink" title="5.本地预览博客"></a>5.本地预览博客</h3><p>编译项目，输入命令：<code>hexo g</code><br>运行项目，输入命令：<code>hexo s</code></p>
<p>在浏览器中输入`<a href="https://links.jianshu.com/go?to=http%3A%2F%2Flocalhost%3A4000%2F" target="_blank" rel="noopener">http://localhost:4000/</a>``就可以看到效果啦</p>
<h3 id="6、-config-yml配置详解"><a href="#6、-config-yml配置详解" class="headerlink" title="6、_config.yml配置详解"></a>6、_config.yml配置详解</h3><p>您可以在 <code>_config.yml</code> 中修改大部分的配置。</p>
<h4 id="网站"><a href="#网站" class="headerlink" title="网站"></a>网站</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>title</code></td>
<td align="left">网站标题</td>
</tr>
<tr>
<td align="left"><code>subtitle</code></td>
<td align="left">网站副标题</td>
</tr>
<tr>
<td align="left"><code>description</code></td>
<td align="left">网站描述</td>
</tr>
<tr>
<td align="left"><code>keywords</code></td>
<td align="left">网站的关键词。支援多个关键词。</td>
</tr>
<tr>
<td align="left"><code>author</code></td>
<td align="left">您的名字</td>
</tr>
<tr>
<td align="left"><code>language</code></td>
<td align="left">网站使用的语言。对于简体中文用户来说，使用不同的主题可能需要设置成不同的值，请参考你的主题的文档自行设置，常见的有 <code>zh-Hans</code>和 <code>zh-CN</code>。</td>
</tr>
<tr>
<td align="left"><code>timezone</code></td>
<td align="left">网站时区。Hexo 默认使用您电脑的时区。请参考 <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="_blank" rel="noopener">时区列表</a> 进行设置，如 <code>America/New_York</code>, <code>Japan</code>, 和 <code>UTC</code> 。一般的，对于中国大陆地区可以使用 <code>Asia/Shanghai</code>。</td>
</tr>
</tbody></table>
<p>其中，<code>description</code>主要用于SEO，告诉搜索引擎一个关于您站点的简单描述，通常建议在其中包含您网站的关键词。<code>author</code>参数用于主题显示文章的作者。</p>
<h4 id="网址"><a href="#网址" class="headerlink" title="网址"></a>网址</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>url</code></td>
<td align="left">网址, must starts with <code>http://</code> or <code>https://</code></td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>root</code></td>
<td align="left">网站根目录</td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>permalink</code></td>
<td align="left">文章的 <a href="https://hexo.io/zh-cn/docs/permalinks" target="_blank" rel="noopener">永久链接</a> 格式</td>
<td align="left"><code>:year/:month/:day/:title/</code></td>
</tr>
<tr>
<td align="left"><code>permalink_defaults</code></td>
<td align="left">永久链接中各部分的默认值</td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>pretty_urls</code></td>
<td align="left">改写 <a href="https://hexo.io/zh-cn/docs/variables" target="_blank" rel="noopener"><code>permalink</code></a> 的值来美化 URL</td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>pretty_urls.trailing_index</code></td>
<td align="left">是否在永久链接中保留尾部的 <code>index.html</code>，设置为 <code>false</code> 时去除</td>
<td align="left"><code>true</code></td>
</tr>
<tr>
<td align="left"><code>pretty_urls.trailing_html</code></td>
<td align="left">是否在永久链接中保留尾部的 <code>.html</code>, 设置为 <code>false</code> 时去除 (<em>对尾部的 <code>index.html</code>无效</em>)</td>
<td align="left"><code>true</code></td>
</tr>
</tbody></table>
<blockquote>
<p>网站存放在子目录</p>
<p>如果您的网站存放在子目录中，例如 <code>http://example.com/blog</code>，则请将您的 <code>url</code> 设为 <code>http://example.com/blog</code> 并把 <code>root</code> 设为 <code>/blog/</code>。</p>
</blockquote>
<p>例如：</p>
<pre><code># 比如，一个页面的永久链接是 http://example.com/foo/bar/index.html
pretty_urls:
  trailing_index: false
# 此时页面的永久链接会变为 http://example.com/foo/bar/</code></pre><h4 id="目录"><a href="#目录" class="headerlink" title="目录"></a>目录</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>source_dir</code></td>
<td align="left">资源文件夹，这个文件夹用来存放内容。</td>
<td align="left"><code>source</code></td>
</tr>
<tr>
<td align="left"><code>public_dir</code></td>
<td align="left">公共文件夹，这个文件夹用于存放生成的站点文件。</td>
<td align="left"><code>public</code></td>
</tr>
<tr>
<td align="left"><code>tag_dir</code></td>
<td align="left">标签文件夹</td>
<td align="left"><code>tags</code></td>
</tr>
<tr>
<td align="left"><code>archive_dir</code></td>
<td align="left">归档文件夹</td>
<td align="left"><code>archives</code></td>
</tr>
<tr>
<td align="left"><code>category_dir</code></td>
<td align="left">分类文件夹</td>
<td align="left"><code>categories</code></td>
</tr>
<tr>
<td align="left"><code>code_dir</code></td>
<td align="left">Include code 文件夹，<code>source_dir</code> 下的子目录</td>
<td align="left"><code>downloads/code</code></td>
</tr>
<tr>
<td align="left"><code>i18n_dir</code></td>
<td align="left">国际化（i18n）文件夹</td>
<td align="left"><code>:lang</code></td>
</tr>
<tr>
<td align="left"><code>skip_render</code></td>
<td align="left">跳过指定文件的渲染。匹配到的文件将会被不做改动地复制到 <code>public</code> 目录中。您可使用 <a href="https://github.com/micromatch/micromatch#extended-globbing" target="_blank" rel="noopener">glob 表达式</a>来匹配路径。</td>
<td align="left"></td>
</tr>
</tbody></table>
<p>例如：</p>
<pre><code>skip_render: &quot;mypage/**/*&quot;
# 将会直接将 `source/mypage/index.html` 和 `source/mypage/code.js` 不做改动地输出到 &#39;public&#39; 目录
# 你也可以用这种方法来跳过对指定文章文件的渲染
skip_render: &quot;_posts/test-post.md&quot;
# 这将会忽略对 &#39;test-post.md&#39; 的渲染</code></pre><blockquote>
<p>提示</p>
<p>如果您刚刚开始接触 Hexo，通常没有必要修改这一部分的值。</p>
</blockquote>
<h4 id="文章"><a href="#文章" class="headerlink" title="文章"></a>文章</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>new_post_name</code></td>
<td align="left">新文章的文件名称</td>
<td align="left">:title.md</td>
</tr>
<tr>
<td align="left"><code>default_layout</code></td>
<td align="left">预设布局</td>
<td align="left">post</td>
</tr>
<tr>
<td align="left"><code>auto_spacing</code></td>
<td align="left">在中文和英文之间加入空格</td>
<td align="left">false</td>
</tr>
<tr>
<td align="left"><code>titlecase</code></td>
<td align="left">把标题转换为 title case</td>
<td align="left">false</td>
</tr>
<tr>
<td align="left"><code>external_link</code></td>
<td align="left">在新标签中打开链接</td>
<td align="left">true</td>
</tr>
<tr>
<td align="left"><code>external_link.enable</code></td>
<td align="left">在新标签中打开链接</td>
<td align="left"><code>true</code></td>
</tr>
<tr>
<td align="left"><code>external_link.field</code></td>
<td align="left">对整个网站（<code>site</code>）生效或仅对文章（<code>post</code>）生效</td>
<td align="left"><code>site</code></td>
</tr>
<tr>
<td align="left"><code>external_link.exclude</code></td>
<td align="left">需要排除的域名。主域名和子域名如 <code>www</code> 需分别配置</td>
<td align="left"><code>[]</code></td>
</tr>
<tr>
<td align="left"><code>filename_case</code></td>
<td align="left">把文件名称转换为 (1) 小写或 (2) 大写</td>
<td align="left">0</td>
</tr>
<tr>
<td align="left"><code>render_drafts</code></td>
<td align="left">显示草稿</td>
<td align="left">false</td>
</tr>
<tr>
<td align="left"><code>post_asset_folder</code></td>
<td align="left">启动 <a href="https://hexo.io/zh-cn/docs/asset-folders" target="_blank" rel="noopener">Asset 文件夹</a></td>
<td align="left">false</td>
</tr>
<tr>
<td align="left"><code>relative_link</code></td>
<td align="left">把链接改为与根目录的相对位址</td>
<td align="left">false</td>
</tr>
<tr>
<td align="left"><code>future</code></td>
<td align="left">显示未来的文章</td>
<td align="left">true</td>
</tr>
<tr>
<td align="left"><code>highlight</code></td>
<td align="left">代码块的设置, see <a href="https://hexo.io/docs/syntax-highlight#Highlight-js" target="_blank" rel="noopener">Highlight.js</a> section for usage guide</td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>prismjs</code></td>
<td align="left">代码块的设置, see <a href="https://hexo.io/docs/syntax-highlight#PrismJS" target="_blank" rel="noopener">PrismJS</a> section for usage guide</td>
<td align="left"></td>
</tr>
</tbody></table>
<blockquote>
<p>相对地址</p>
<p>默认情况下，Hexo 生成的超链接都是绝对地址。例如，如果您的网站域名为 <code>example.com</code>,您有一篇文章名为 <code>hello</code>，那么绝对链接可能像这样：<code>http://example.com/hello.html</code>，它是<strong>绝对</strong>于域名的。相对链接像这样：<code>/hello.html</code>，也就是说，无论用什么域名访问该站点，都没有关系，这在进行反向代理时可能用到。通常情况下，建议使用绝对地址。</p>
</blockquote>
<h4 id="分类-amp-标签"><a href="#分类-amp-标签" class="headerlink" title="分类 &amp; 标签"></a>分类 &amp; 标签</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>default_category</code></td>
<td align="left">默认分类</td>
<td align="left"><code>uncategorized</code></td>
</tr>
<tr>
<td align="left"><code>category_map</code></td>
<td align="left">分类别名</td>
<td align="left"></td>
</tr>
<tr>
<td align="left"><code>tag_map</code></td>
<td align="left">标签别名</td>
<td align="left"></td>
</tr>
</tbody></table>
<h4 id="日期-时间格式"><a href="#日期-时间格式" class="headerlink" title="日期 / 时间格式"></a>日期 / 时间格式</h4><p>Hexo 使用 <a href="http://momentjs.com/" target="_blank" rel="noopener">Moment.js</a> 来解析和显示时间。</p>
<table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>date_format</code></td>
<td align="left">日期格式</td>
<td align="left"><code>YYYY-MM-DD</code></td>
</tr>
<tr>
<td align="left"><code>time_format</code></td>
<td align="left">时间格式</td>
<td align="left"><code>HH:mm:ss</code></td>
</tr>
<tr>
<td align="left"><code>updated_option</code></td>
<td align="left">当 Front Matter 中没有指定 <a href="https://hexo.io/zh-cn/docs/variables#页面变量" target="_blank" rel="noopener"><code>updated</code></a> 时 <code>updated</code> 的取值</td>
<td align="left"><code>mtime</code></td>
</tr>
</tbody></table>
<blockquote>
<p>updated_option</p>
<p><code>updated_option</code> 控制了当 Front Matter 中没有指定 <code>updated</code> 时，<code>updated</code> 如何取值：</p>
<ul>
<li><code>mtime</code>: 使用文件的最后修改时间。这是从 Hexo 3.0.0 开始的默认行为。</li>
<li><code>date</code>: 使用 <code>date</code> 作为 <code>updated</code> 的值。可被用于 Git 工作流之中，因为使用 Git 管理站点时，文件的最后修改日期常常会发生改变</li>
<li><code>empty</code>: 直接删除 <code>updated</code>。使用这一选项可能会导致大部分主题和插件无法正常工作。</li>
</ul>
<p><code>use_date_for_updated</code> 选项已经被废弃，将会在下个重大版本发布时去除。请改为使用 <code>updated_option: &#39;date&#39;</code>。</p>
</blockquote>
<pre><code>use_date_for_updated` | 启用以后，如果 Front Matter 中没有指定 `updated`， [`post.updated`](https://hexo.io/zh-cn/docs/configuration) 将会使用 `date` 的值而不是文件的创建时间。在 Git 工作流中这个选项会很有用 | `true</code></pre><h4 id="分页"><a href="#分页" class="headerlink" title="分页"></a>分页</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
<th align="left">默认值</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>per_page</code></td>
<td align="left">每页显示的文章量 (0 = 关闭分页功能)</td>
<td align="left"><code>10</code></td>
</tr>
<tr>
<td align="left"><code>pagination_dir</code></td>
<td align="left">分页目录</td>
<td align="left"><code>page</code></td>
</tr>
</tbody></table>
<h4 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h4><table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>theme</code></td>
<td align="left">当前主题名称。值为<code>false</code>时禁用主题</td>
</tr>
<tr>
<td align="left"><code>theme_config</code></td>
<td align="left">主题的配置文件。在这里放置的配置会覆盖主题目录下的 <code>_config.yml</code> 中的配置</td>
</tr>
<tr>
<td align="left"><code>deploy</code></td>
<td align="left">部署部分的设置</td>
</tr>
<tr>
<td align="left"><code>meta_generator</code></td>
<td align="left"><a href="https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/meta#属性" target="_blank" rel="noopener">Meta generator</a> 标签。 值为 <code>false</code> 时 Hexo 不会在头部插入该标签</td>
</tr>
</tbody></table>
<h5 id="包括或不包括目录和文件"><a href="#包括或不包括目录和文件" class="headerlink" title="包括或不包括目录和文件"></a>包括或不包括目录和文件</h5><p>在 Hexo 配置文件中，通过设置 include/exclude 可以让 Hexo 进行处理或忽略某些目录和文件夹。你可以使用 <a href="https://github.com/isaacs/minimatch" target="_blank" rel="noopener">glob 表达式</a> 对目录和文件进行匹配。</p>
<p><code>include</code> and <code>exclude</code> options only apply to the <code>source/</code> folder, whereas <code>ignore</code> option applies to all folders.</p>
<table>
<thead>
<tr>
<th align="left">参数</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><code>include</code></td>
<td align="left">Hexo 默认会忽略隐藏文件和文件夹（包括名称以下划线和 <code>.</code> 开头的文件和文件夹，Hexo 的 <code>_posts</code> 和 <code>_data</code> 等目录除外）。通过设置此字段将使 Hexo 处理他们并将它们复制到 <code>source</code> 目录下。</td>
</tr>
<tr>
<td align="left"><code>exclude</code></td>
<td align="left">Hexo 会忽略这些文件和目录</td>
</tr>
<tr>
<td align="left"><code>ignore</code></td>
<td align="left">Ignore files/folders</td>
</tr>
</tbody></table>
<p>举例：</p>
<pre><code># Include/Exclude Files/Folders
include:
  - &quot;.nojekyll&quot;
  # 包括 &#39;source/css/_typing.css&#39;
  - &quot;css/_typing.css&quot;
  # 包括 &#39;source/_css/&#39; 中的任何文件，但不包括子目录及其其中的文件。
  - &quot;_css/*&quot;
  # 包含 &#39;source/_css/&#39; 中的任何文件和子目录下的任何文件
  - &quot;_css/**/*&quot;

exclude:
  # 不包括 &#39;source/js/test.js&#39;
  - &quot;js/test.js&quot;
  # 不包括 &#39;source/js/&#39; 中的文件、但包括子目录下的所有目录和文件
  - &quot;js/*&quot;
  # 不包括 &#39;source/js/&#39; 中的文件和子目录下的任何文件
  - &quot;js/**/*&quot;
  # 不包括 &#39;source/js/&#39; 目录下的所有文件名以 &#39;test&#39; 开头的文件，但包括其它文件和子目录下的单文件
  - &quot;js/test*&quot;
  # 不包括 &#39;source/js/&#39; 及其子目录中任何以 &#39;test&#39; 开头的文件
  - &quot;js/**/test*&quot;
  # 不要用 exclude 来忽略 &#39;source/_posts/&#39; 中的文件。你应该使用 &#39;skip_render&#39;，或者在要忽略的文件的文件名之前加一个下划线 &#39;_&#39;
  # 在这里配置一个 - &quot;_posts/hello-world.md&quot; 是没有用的。

ignore:
  # Ignore any folder named &#39;foo&#39;.
  - &quot;**/foo&quot;
  # Ignore &#39;foo&#39; folder in &#39;themes/&#39; only.
  - &quot;**/themes/*/foo&quot;
  # Same as above, but applies to every subfolders of &#39;themes/&#39;.
  - &quot;**/themes/**/foo&quot;</code></pre><p>列表中的每一项都必须用单引号或双引号包裹起来。</p>
<p><code>include</code> 和 <code>exclude</code> 并不适用于 <code>themes/</code> 目录下的文件。如果需要忽略 <code>themes/</code> 目录下的部分文件或文件夹，可以使用 <code>ignore</code> 或在文件名之前添加下划线 <code>_</code>。</p>
<h5 id="使用代替配置文件"><a href="#使用代替配置文件" class="headerlink" title="使用代替配置文件"></a>使用代替配置文件</h5><p>可以在 hexo-cli 中使用 <code>--config</code> 参数来指定自定义配置文件的路径。你可以使用一个 YAML 或 JSON 文件的路径，也可以使用逗号分隔（无空格）的多个 YAML 或 JSON 文件的路径。例如：</p>
<pre><code># use &#39;custom.yml&#39; in place of &#39;_config.yml&#39;
$ hexo server --config custom.yml

# use &#39;custom.yml&#39; &amp; &#39;custom2.json&#39;, prioritizing &#39;custom3.yml&#39;, then &#39;custom2.json&#39;
$ hexo generate --config custom.yml,custom2.json,custom3.yml</code></pre><p>当你指定了多个配置文件以后，Hexo 会按顺序将这部分配置文件合并成一个 <code>_multiconfig.yml</code>。如果遇到重复的配置，排在后面的文件的配置会覆盖排在前面的文件的配置。这个原则适用于任意数量、任意深度的 YAML 和 JSON 文件。</p>
<p>例如，使用 <code>--options</code> 指定了两个自定义配置文件：</p>
<pre><code>$ hexo generate --config custom.yml,custom2.json</code></pre><p>如果 <code>custom.yml</code> 中指定了 <code>foo: bar</code>，在 custom2.json 中指定了 <code>&quot;foo&quot;: &quot;dinosaur&quot;</code>，那么在 <code>_multiconfig.yml</code> 中你会得到 <code>foo: dinosaur</code>。</p>
<h5 id="使用代替主题配置文件"><a href="#使用代替主题配置文件" class="headerlink" title="使用代替主题配置文件"></a>使用代替主题配置文件</h5><p>通常情况下，Hexo 主题是一个独立的项目，并拥有一个独立的 <code>_config.yml</code> 配置文件。</p>
<p>除了自行维护独立的主题配置文件，你也可以在其它地方对主题进行配置。</p>
<p><strong>配置文件中的 <code>theme_config</code></strong></p>
<blockquote>
<p>该特性自 Hexo 2.8.2 起提供</p>
</blockquote>
<pre><code># _config.yml
theme: &quot;my-theme&quot;
theme_config:
  bio: &quot;My awesome bio&quot;
  foo:
    bar: &#39;a&#39;
# themes/my-theme/_config.yml
bio: &quot;Some generic bio&quot;
logo: &quot;a-cool-image.png&quot;
  foo:
    baz: &#39;b&#39;</code></pre><p>最终主题配置的输出是：</p>
<pre><code>{
  bio: &quot;My awesome bio&quot;,
  logo: &quot;a-cool-image.png&quot;,
  foo: {
    bar: &quot;a&quot;,
    baz: &quot;b&quot;
  }
}</code></pre><p><strong>独立的 <code>_config.[theme].yml</code> 文件</strong></p>
<blockquote>
<p>该特性自 Hexo 5.0.0 起提供</p>
</blockquote>
<p>独立的主题配置文件应放置于站点根目录下，支持 <code>yml</code> 或 <code>json</code> 格式。需要配置站点 <code>_config.yml</code> 文件中的 <code>theme</code> 以供 Hexo 寻找 <code>_config.[theme].yml</code> 文件。</p>
<pre><code># _config.yml
theme: &quot;my-theme&quot;
# _config.my-theme.yml
bio: &quot;My awesome bio&quot;
foo:
  bar: &#39;a&#39;
# themes/my-theme/_config.yml
bio: &quot;Some generic bio&quot;
logo: &quot;a-cool-image.png&quot;
  foo:
    baz: &#39;b&#39;</code></pre><p>最终主题配置的输出是：</p>
<pre><code>{
  bio: &quot;My awesome bio&quot;,
  logo: &quot;a-cool-image.png&quot;,
  foo: {
    bar: &quot;a&quot;,
    baz: &quot;b&quot;
  }
}</code></pre><blockquote>
<p>我们强烈建议你将所有的主题配置集中在一处。如果你不得不在多处配置你的主题，那么这些信息对你将会非常有用：Hexo 在合并主题配置时，Hexo 配置文件中的 <code>theme_config</code> 的优先级最高，其次是 <code>_config.[theme].yml</code> 文件，最后是位于主题目录下的 <code>_config.yml</code> 文件。</p>
</blockquote>
<h2 id="部署博客到Gitee上"><a href="#部署博客到Gitee上" class="headerlink" title="部署博客到Gitee上"></a>部署博客到Gitee上</h2><h3 id="1-创建Gitee账号"><a href="#1-创建Gitee账号" class="headerlink" title="1. 创建Gitee账号"></a>1. 创建Gitee账号</h3><p>到码云：<a href="https://links.jianshu.com/go?to=https%3A%2F%2Fgitee.com%2F" target="_blank" rel="noopener">https://gitee.com/</a> 上申请注册账号，码云类似国内版的GitHub，所以操作界面跟GitHub差不多，多了一些国产化的东西，这里不做更多介绍了，自己研究下。</p>
<h3 id="2-创建项目"><a href="#2-创建项目" class="headerlink" title="2. 创建项目"></a>2. 创建项目</h3><p><img src="https://gitee.com/loveyangxiaoyu/pic/raw/master/img/lrt/20200328214157.png" alt="image-20200328214153969"></p>
<h3 id="3-在-config-yml中配置Git"><a href="#3-在-config-yml中配置Git" class="headerlink" title="3. 在_config.yml中配置Git"></a>3. 在_config.yml中配置Git</h3><pre><code class="yml">deploy:
  type: git
  repo: https://gitee.com/loveyangxiaoyu/lrt_blog.git
  branch: master</code></pre>
<p>注意：冒号后面一定要有空格，否则不能正确识别。</p>
<h3 id="4-发布到Gitee"><a href="#4-发布到Gitee" class="headerlink" title="4. 发布到Gitee"></a>4. 发布到Gitee</h3><p>输入命令<code>yarn add hexo-deployer-git</code> 安装自动部署发布工具<br>输入命令<code>hexo clean &amp;&amp; hexo g &amp;&amp; hexo d</code> 发布博客，首次发布需要在shell中输入账号和密码。</p>
<h3 id="5-Gitee-Pages设置"><a href="#5-Gitee-Pages设置" class="headerlink" title="5. Gitee Pages设置"></a>5. Gitee Pages设置</h3><p>在项目的服务中选择Pages选项</p>
<p><img src="https://gitee.com/loveyangxiaoyu/pic/raw/master/img/lrt/20200328214435.png" alt="image-20200328214433830"></p>
<p>选择 master分支，点击 部署/更新</p>
<p> <img src="https://gitee.com/loveyangxiaoyu/pic/raw/master/img/lrt/20200328214512.png" alt="image-20200328214511084"></p>
<p>稍等一会儿博客就发布成功啦，访问博客地址：<a href="https://loveyangxiaoyu.gitee.io/lrt_blog">https://loveyangxiaoyu.gitee.io/lrt_blog</a>，就可预览在线博客啦！！！<br>如果博客的样式不对，则需要在_config.yml中配置下博客地址和路径：</p>
<pre><code class="yml">url: https://loveyangxiaoyu.gitee.io/lrt_blog
root: /lrt_blog</code></pre>
<p>至此，我们的博客就搭建完成啦！！！<br>在<code>/Hexo/source/_posts</code>目录下就可以写我们的博客啦！！！</p>
<h2 id="配置alias命令"><a href="#配置alias命令" class="headerlink" title="配置alias命令"></a>配置alias命令</h2><p>在<code>c:\users\用户</code>  目录下新建或修改.bashrc文件，windows不能新建.开头的文件，在git bash下新建<code>touch .bashrc</code></p>
<pre><code class="bash">alias hs=&#39;hexo clean &amp;&amp; hexo g &amp;&amp; hexo s&#39;
alias hd=&#39;hexo clean &amp;&amp; hexo g &amp;&amp; hexo d &amp;&amp; rm -rf .deploy_git&#39;
alias hn=&#39;hexo new&#39;
alias hnp=&#39;hexo new page&#39;</code></pre>
<h2 id="配置二级目录categories、tags"><a href="#配置二级目录categories、tags" class="headerlink" title="配置二级目录categories、tags"></a>配置二级目录categories、tags</h2><p>新建</p>
<pre><code class="bash">$ hexo new categories
$ hexo new tags</code></pre>
<p>修改<code>source\categories</code>目录下的index.md文件</p>
<pre><code class="markdown">---
title: categories
date: 2019-11-11 15:39:50
type: &quot;categories&quot;
---</code></pre>
<p>修改<code>source\tags</code>目录下的index.md文件</p>
<pre><code class="markdown">---
title: tags
date: 2019-11-11 15:39:50
type: &quot;tags&quot;
---</code></pre>
<p>在新建的page里面就可以添加二级目录和标签属性了</p>
<pre><code>---
title: Git 学习笔记
date: 2019-11-12 20:00:24
categories:
- 工具
- git
tags:
- 教程
top: 
---</code></pre><h2 id="配置模板"><a href="#配置模板" class="headerlink" title="配置模板"></a>配置模板</h2><p>修改scaffolds下面的draft.md、page.md、post.md三个文件</p>
<p>page是hexo new 模板-独立页面</p>
<p>post是hexo new post 模板-博客文章</p>
<p><strong>draft.md</strong></p>
<pre><code class="markdown">---
title: {{ title }}
top:
categories:
tags:
---</code></pre>
<p><strong>post.md</strong></p>
<pre><code class="markdown">---
title: {{ title }}
date: {{ date }}
top:
categories:
tags:
---</code></pre>
<p><strong>page.md</strong></p>
<pre><code class="markdown">---
title: {{ title }}
date: {{ date }}
---</code></pre>
<h2 id="配置编辑器"><a href="#配置编辑器" class="headerlink" title="配置编辑器"></a>配置编辑器</h2><p>在 hexo new 之后立即打开自定义markdown编辑软件进行编辑。</p>
<h3 id="1、新建scripts文件夹"><a href="#1、新建scripts文件夹" class="headerlink" title="1、新建scripts文件夹"></a>1、新建scripts文件夹</h3><p>在你的hexo目录下新建一个文件夹名叫<code>scripts</code>（你的hexo目录就是你执行hexo命令的目录）</p>
<p>2、新建<code>HexoNewListener</code>文件</p>
<p>在scripts目录下创建一个HexoNewListener.js文件，编辑文件内容为：</p>
<pre><code class="javascript">&quot;use strict&quot;;
let spawn = require(&#39;child_process&#39;).spawn;

hexo.on(&#39;new&#39;, function (data) {
    spawn(&#39;D:\\App\\Typora\\Typora.exe&#39;, [data.path]);
});</code></pre>
<p>如果你是Mac平台Hexo用户，则将下列内容写入你的脚本：</p>
<pre><code class="javascript">let exec = require(&#39;child_process&#39;).exec;

// Hexo 2.x 用户复制这段
hexo.on(&#39;new&#39;, function(path){
    exec(&#39;open -a &quot;markdown编辑器绝对路径.app&quot; &#39; + path);
});
// Hexo 3 用户复制这段
hexo.on(&#39;new&#39;, function(data){
    exec(&#39;open -a &quot;markdown编辑器绝对路径.app&quot; &#39; + data.path);
});</code></pre>
<h2 id="3-hexo配置帮助"><a href="#3-hexo配置帮助" class="headerlink" title="3-hexo配置帮助"></a>3-hexo配置帮助</h2><p>3-hexo主题配置信息可以在<a href="http://yelog.org/" target="_blank" rel="noopener">叶落阁</a>博客里面查找</p>

      
       <hr><span style="font-style: italic;color: gray;"> 转载请注明来源，欢迎对文章中的引用来源进行考证，欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论，也可以邮件至 86415270@qq.com </span>
    </div>
</article>


<p>
    <a class="dashang" onclick="dashangToggle()">赏</a>
</p>


<div class="article_copyright">
    <p><span class="copy-title">文章标题:</span>使用Gitee+Hexo搭建个人博客</p>
    <p><span class="copy-title">文章字数:</span><span class="post-count">4.3k</span></p>
    <p><span class="copy-title">本文作者:</span><a title="李瑞桐">李瑞桐</a></p>
    <p><span class="copy-title">发布时间:</span>2019-11-14, 00:00:00</p>
    <p><span class="copy-title">最后更新:</span>2021-02-19, 14:17:21</p>
    <span class="copy-title">原始链接:</span><a class="post-url" href="/lrt_blog/2019/11/14/77%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/%E4%BD%BF%E7%94%A8Gitee+Hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" title="使用Gitee+Hexo搭建个人博客">https://loveyangxiaoyu.gitee.io/lrt_blog/2019/11/14/77%E5%85%B6%E4%BB%96%E5%B7%A5%E5%85%B7/%E4%BD%BF%E7%94%A8Gitee+Hexo%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/</a>
    <p>
        <span class="copy-title">版权声明:</span><i class="fa fa-creative-commons"></i> <a rel="license noopener" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
    </p>
</div>



    <div id="comments"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

<script type="text/javascript">
    $.getScript('/lrt_blog/js/gitalk.js', function () {
        var gitalk = new Gitalk({
            clientID: '977658d53bffc49a7231',
            clientSecret: 'bd5ef398e64a580d122200d984d56f6da067ff83',
            repo: 'lrt890424.github.io',
            owner: 'lrt890424',
            admin: ['lrt890424'],
            id: decodeURI(location.pathname),
            distractionFreeMode: 'true',
            language: 'zh-CN',
            perPage: parseInt('10',10)
        })
        gitalk.render('comments')
    })
</script>




    




    </div>
    <div class="copyright">
        <p class="footer-entry">©2016-2020 Li Ruitong</p>
<p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p>

    </div>
    <div class="full-toc">
        <button class="full"><span class="min "></span></button>
<button class="post-toc-menu"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class="" id="rocket" ></a>
    </div>
</div>
<div class="acParent"></div>

<div class="hide_box" onclick="dashangToggle()"></div>
<div class="shang_box">
    <a class="shang_close" onclick="dashangToggle()">×</a>
    <div class="shang_tit">
        <p>喜欢就点赞,疼爱就打赏</p>
    </div>
    <div class="shang_payimg">
        <div class="pay_img">
            <img src="/lrt_blog/img/alipay.jpg" class="alipay" title="扫码支持">
            <img src="/lrt_blog/img/weixin.jpg" class="weixin" title="扫码支持">
        </div>
    </div>
    <div class="shang_payselect">
        <span><label><input type="radio" name="pay" checked value="alipay">支付宝</label></span><span><label><input type="radio" name="pay" value="weixin">微信</label></span>
    </div>
</div>


</body>
<script src="/lrt_blog/js/jquery.pjax.js?v=1.0.0" ></script>

<script src="/lrt_blog/js/script.js?v=1.0.0" ></script>
<!-- 代码块复制功能 -->
<script type="text/javascript" src="/lrt_blog/js/clipboard.min.js"></script>
<script type="text/javascript" src="/lrt_blog/js/clipboard-use.js"></script>
<!-- mermaid chart -->

<script src='https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js'></script>
<script>
    if (window.mermaid) {
        mermaid.initialize({theme: 'forest'});
    }
</script>

<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['#教程','#centos','#linux','#问题集锦','#防火墙','#软件安装','#ubuntu','#svn','#git','#MongoDB','#jd-gui','#java','#反编译','#MySQL','#Redis','#学习笔记','#navicat','#DM','#windows','#系统优化','#书签','#Nginx','#docker','#vue','#Yarn','#前端开发','#vscode','#eslint','#prettier','#Markdown','#hexo','#开源','#Maven',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        
            $(".post .pjax table").addClass("green_title");
        

        /*渲染打赏样式*/
        
        $("input[name=pay]").on("click", function () {
            if($("input[name=pay]:checked").val()=="weixin"){
                $(".shang_box .shang_payimg .pay_img").addClass("weixin_img");
            } else {
                $(".shang_box .shang_payimg .pay_img").removeClass("weixin_img");
            }
        })
        

        /*高亮代码块行号*/
        
        $('pre code').each(function(){
            var lines = $(this).text().split('\n').length, widther='';
            if (lines>99) {
                widther = 'widther'
            }
            var $numbering = $('<ul/>').addClass('pre-numbering ' + widther).attr("unselectable","on");
            $(this).addClass('has-numbering ' + widther)
                    .parent()
                    .append($numbering);
            for(var i=1;i<=lines;i++){
                $numbering.append($('<li/>').text(i));
            }
        });
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
    }

    /*打赏页面隐藏与展示*/
    
    function dashangToggle() {
        $(".shang_box").fadeToggle();
        $(".hide_box").fadeToggle();
    }
    

</script>

<!--加入行号的高亮代码块样式-->

<style>
    pre{
        position: relative;
        margin-bottom: 24px;
        border-radius: 10px;
        border: 1px solid #e2dede;
        background: #FFF;
        overflow: hidden;
    }
    code.has-numbering{
        margin-left: 30px;
    }
    code.has-numbering.widther{
        margin-left: 35px;
    }
    .pre-numbering{
        margin: 0px;
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        padding: 0.5em 3px 0.7em 5px;
        border-right: 1px solid #C3CCD0;
        text-align: right;
        color: #AAA;
        background-color: #fafafa;
    }
    .pre-numbering.widther {
        width: 35px;
    }
</style>

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 542px;
    }
    .nav.fullscreen {
        margin-left: -542px;
    }
    .nav-left {
        width: 120px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 492px;
        }
        .nav.fullscreen {
            margin-left: -492px;
        }
        .nav-left {
            width: 100px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 492px;
            margin-left: -492px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 492px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    

    
</style>







</html>
